package Io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        osw.write("我是这路上没名字的人，我没有新闻没有人评论.");
        osw.write("要拼尽所有换的普通的剧本，辗转反侧不过谋生");
        System.out.println("写入完毕");
        osw.close();

    }
}
